﻿//using Autofac;
//using Autofac.Integration.Mvc;
//using GrainManage.Interface;
//using GrainManage.Proxy;
//using System.Reflection;
//using System.Web.Mvc;

//namespace GrainManage.Web
//{
//    public class AutofacConfig
//    {
//        public static void RegisterTypes()
//        {
//            var builder = new ContainerBuilder();
//            SetupResolveRules(builder);
//            var container = builder.Build();
//            DependencyResolver.SetResolver(new AutofacDependencyResolver(container));
//        }

//        private static void SetupResolveRules(ContainerBuilder builder)
//        {
//            //RegisterType
//            builder.RegisterType<AccountProxy>().As<IAccount>();
//            builder.RegisterType<ColumnProxy>().As<IColumn>();
//            builder.RegisterType<ContactProxy>().As<IContact>();
//            builder.RegisterType<DistrictProxy>().As<IDistrict>();
//            builder.RegisterType<EncryptProxy>().As<IEncrypt>();
//            builder.RegisterType<ImageProxy>().As<IImage>();
//            builder.RegisterType<PriceProxy>().As<IPrice>();
//            builder.RegisterType<StatusProxy>().As<IStatus>();
//            builder.RegisterType<TradeProxy>().As<ITrade>();
//            builder.RegisterType<TypeProxy>().As<IType>();
//            builder.RegisterType<WeatherProxy>().As<IWeather>();

//            //Register Controllers
//            builder.RegisterControllers(Assembly.GetExecutingAssembly()).Except<GrainManage.Web.Controllers.BaseController>();
//        }
//    }
//}